package com.xm_jd.model.dao;

import java.util.List;

import com.xm_jd.model.entitys.PjVO;
import com.xm_jd.utils.BaseDao;

public class PJDao {
	BaseDao<PjVO> dao = new BaseDao<>(PjVO.class);
	
	
	//根据传过来的商品编号查询该商品的销售属性值（颜色，内存）
	public List<PjVO> getselectXssxz(int id){
		String sql = "SELECT DISTINCT xssxz_zhi FROM tb_pj INNER JOIN tb_shoop ON tb_pj.pj_shoop_id=tb_shoop.shoop_Id INNER JOIN tb_xssxz ON tb_pj.pj_shoop_id=tb_xssxz.xssxz__shoop_id WHERE pj_shoop_id="+id+";";
		return dao.selectAll(sql, null);
	}
	
	//根据商品编号查询所有该商品的评价
	public List<PjVO> getselectPj(int id){
		String sql = "SELECT * FROM tb_pj WHERE pj_shoop_id="+id+";";
		return dao.selectAll(sql, null);
	}
	
}
